package com.lzy;

import com.alibaba.dubbo.config.spring.context.annotation.EnableDubbo;
import com.lzy.service.impl.UserServiceImpl;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.hystrix.EnableHystrix;

import java.util.LinkedList;

@EnableDubbo  // 开始Dubbo注解
@SpringBootApplication
@EnableHystrix
public class OrderMainApplication {

	public static void main(String[] args) {
//		SpringApplication.run(OrderMainApplication.class);
		System.out.println(1231 & 0x7FFFFFFF);
		System.out.println(-8 & 0x7FFFFFFF);
		System.out.println(0x7FFFFFFF);

		System.out.println(test());

		String s = new String();
		System.out.println(s);
	}

	public static int test() {
		int count = 0;

		try {

			return ++count;
		} catch (Exception e) {
			return 0;
		} finally {
			count++;
			System.out.println(count);
		}
	}

//	public static void main(String[] args) throws IOException {
//		ClassPathXmlApplicationContext ioc = new ClassPathXmlApplicationContext("consumer.xml");
//		OrderService orderService = ioc.getBean(OrderService.class);
//		orderService.initOrder("1");
//		System.out.println("调用完成~");
//		System.in.read();
//	}
}
